<!DOCTYPE html>
<html lang="en"><head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>下载图床的连续数字命名的图片</title>
    <link rel="stylesheet" href="./css.css">
    <style>
        img{
            max-width:100px;
        }
    </style>
</head>
<body>
    <div>
        由于没有开放跨站请求的 跨站的下载请求会被禁止, 所以只能打开新的标签页手动下载。
        <input type="text" id="bed" value="https://i0.nyacdn.com/galleries/">
        <input type="text" id="id" value="">
        <input type="text" id="opNub" value="1">
        <input type="text" id="edNub" value="1">
        <button onclick="dl()">
            输入完成后点击下载
        </button>
        <a download="1.png" href="./1.png">
        asdasdsd
        </a>
        <script src="../basics/basics.js" type="text/javascript"></script>
        <script>
                function dl(){
                    var d=document.getElementById("bed").value+
                    document.getElementById("id").value+'/';
                    var i=parseInt(document.getElementById("opNub").value);
                    var l=parseInt(document.getElementById("edNub").value);
                    var list=new Array(l-i+1);
                    for(var j=i,p=0;j<l;++j,++p){
                        list[p]=j;
                    }
                    selectImg(d,list,[".jpg"],function(urlList){
                        for(var i=0;i<urlList.length;++i){
                            var img=new Image();
                            img.src=urlList[i]
                            document.body.appendChild(img);
                        }
                    });
                }
        </script>
    </div>

</body></html>